<?php form_head($this->user->current_controller(),""); ?>
      
    
        	<?php text_field("subject", "ปัญหาเรื่อง", null,1); ?>
        <?php text_field("code", "เลขทีวัสดุ-ครุภัฑ์ที่แจ้งซ่อม", null,1,"code"); ?>
  

	
		  <?php area_field("remark", "รายละเอียดปัญหาที่พบ", null,1,2); ?>
		 
          
        
         
         

          
         
          <?php form_footer(); ?>
          <style>
          #remark
          {
          	width: 500px;
          	height: 200px;
          	
          }
          </style>
          <script type="text/javascript">
   <?php $sql = "select * from item_amount_views where  amount > allocation_total";
	$rows = $this->db->query($sql)->result_array();
   
   ?>
	$(function() {
		var availableTags = [
			<?php foreach($rows as $row){ 
			echo '"'.$row['code'].'",';
			}
				?>
			
			
		
		];
		$( ".code" ).autocomplete({
			source: availableTags
		});
	});
	</script>